package com.jt.service;

import com.jt.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(name = "sso-system",contextId = "remoteUserService")
public interface RemoteUserService {

    /**
     * select user by username
     * @Description 通过用户名查询用户
     * @Date 15:19 2021/11/25
     * @param username username
     * @return com.jt.pojo.User
     **/
    @GetMapping("/user/login/{username}")
    User selectUserByUsername(@PathVariable("username") String username);

    /**
     * select userPermissions by userId
     * @Date 15:25 2021/11/25
     * @param userId userId
     * @return userPermissions
     **/
    @GetMapping("/user/permission/{userId}")
    List<String> selectUserPermissions(@PathVariable("userId") Long userId);

}
